//: Filename : main.cpp
//: the app of TestTemplate
//: Author : Li Ji
//: Date : 2014.05.13


#include "../lib/test.h"
#include <iostream>
using namespace std;

int main()
{

    Man<int> liji;
    liji.setAge(10);
    liji.houses += 1;
    Man<double>* child = liji.getSun<double>();
    child->setAge(-1);
    cout << "child age:" << child->getAge() << endl;
    cout << Man<int>::houses << endl;
    Man<int> yj;
    yj.setAge(22);
    cout << Man<double>::houses << endl;

    BaseDefs< Man<int> >::vecT family;
    family.push_back(liji);
    family.push_back(yj);

    for(std::size_t i = 0; i < family.size(); i++)
    {
        cout << family[i].getAge() << endl;
    }

    BaseDefs<Man<int> >::vecTP familyP;
    familyP.push_back(&liji);
    familyP.push_back(&yj);

    for(std::size_t i = 0; i < familyP.size(); i++)
    {
        cout << familyP[i]->getAge() << endl;
    }

    return 0;
}
